package com.itlong.cloud.user.app;

import com.itlong.cloud.POJO.PO.AppTempFaceShowPO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.Map;

/**
 * <desc>
 *      演示版App接口暴露
 * </desc>
 *
 * @createDate 2018/3/6
 */
@FeignClient(name = "user-service")
public interface IAppShowServiceClient {

    /**
     * <desc>
     *      根据userId查询余额
     * <desc/>
     * @param  userId   带查询的userId
     * @return 余额
     * @author Biao.R
     * @createDate 2018/3/6
     */
    @PostMapping(path = "/show/getBalanceByUserId")
    BigDecimal getBalanceByUserId(@RequestParam("userId") String userId);

    /**
     * <desc>
     *      人脸识别演示向账户充值或扣费
     * <desc/>
     * @param   faceShowPO  人脸识别PO
     * @return  人脸识别PO
     * @author Biao.R
     * @createDate 2018/3/6
     */
    @PostMapping(path = "/show/updateBalance")
    Map<String, Object> updateBalance(@RequestBody AppTempFaceShowPO faceShowPO);
}
